package com.jby.seckill.vo;


import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * 公共返回对象枚举
 */
@ToString
@AllArgsConstructor
@Getter
public enum RespBeanEnum {

    //通用
    SUCCESS(200,"SUCCESS"),
    ERROR(500,"服务端异常"),

    //登录模块5002XX,
    LOGIN_ERROR(500210,"用户名或密码不正确"),
    REGISTER_ERROR(500209,"用户已存在"),

    MOBILE_ERROR(500211,"手机号格式不正确"),
    BIND_ERROR(500212,"参数校验异常"),
    USER_NOT_EXIST(500213,"用户不存在"),
    //秒杀模块5005XX
    EMPTY_STOCK(500501,"库存不足"),
    REPEAT_ERROR(500502,"该商品限购一件"),
    //订单模块
    ORDER_NOT_EXIST(500301,"订单不存在")
    ;

    private final Integer code;
    private final String message;

}
